import {requestDel, requestPatch, requestPost} from './request'

export async function updateNode(node) {
  return await requestPatch(`/node/${node.id}/`, node)
}

export async function updateBulkNodes(nodes) {
  return await requestPatch('/node/bulk_update/', nodes)
}

export async function deleteNode(id) {
  return await requestDel(`/node/${id}`)
}

export async function createNode(node) {
  return await requestPost(`/node/`, node)
}
